<template>
	<view class="page-body">
		<!-- 表单开始 -->
		<MyEditora :modelValue="modelValue" @change="gethtml" style="margin-bottom: 20px;"></MyEditora>
		<el-row>
		  <el-button @click="bianji" type="success">编辑内容</el-button>
		</el-row>
		<!-- 表单结束 -->
	</view>
</template>
<script>
var that; // 当前页面对象
var vk = uni.vk; // vk实例
import MyEditora from '@/components/mosowe-editor/mosowe-editor';
export default {
	components: {MyEditora},
	data() {
		return {
			modelValue:'',
			itemp:{
				
			}
		}
	},
	// 监听-页面每次【加载时】执行(如:前进)
	onLoad(options = {}) {
		that = this;
		vk = that.vk;
		that.options = options;
		this.itemp = vk.getStorageSync("hdfb_key");
		this.modelValue = this.itemp.editor
		//console.log(this.itemp)
	},
	created() {},
	mounted() {},
	methods: {
		bianji(){
			vk.callFunction({
			  url: 'admin/hymbjyxh/nrgl/kh/nrgl-obj.updateObjOne',
			  title: '请求中...',
			  data: {
			    ...this.itemp
			  },
			  success: (data) => {
			    console.log(data)
			  },
			  fail: (err) => {
			    
			  },
			  complete: (res) => {
			    
			  }
			});
		},
		gethtml(get){
			//console.log(get)
			//文本内容赋值
			this.modelValue = get;
			this.itemp.editor = get;
		},
	},
	// 监听器
	watch: {},
	// 过滤器
	filters: {},
	// 计算属性
	computed: {},
}

</script>
<style lang="scss" scoped>
</style>
